import { ref, computed } from "vue";
import { defineStore } from "pinia";
//全局消息
export const useMessageStore = defineStore(
    "message", () => {
        const chatMessage = ref([])
        function setChatMessage(params) {
            chatMessage.value = params
        }

        const FriendMessage = ref([])
        function setFriendMessage(params) {
            FriendMessage.value = params
        }

        const GroupMessage = ref([])
        function setGroupMessage(params) {
            GroupMessage.value = params
        }

        const CircleFriendsMessage = ref([])
        function setCircleFriendsMessage(params) {
            CircleFriendsMessage.value = params
        }

        const SetingMessage = ref([])
        function setSetingMessage(params) {
            SetingMessage.value = params
        }

        return { chatMessage, setChatMessage, FriendMessage, setFriendMessage, GroupMessage, setGroupMessage, CircleFriendsMessage, setCircleFriendsMessage, SetingMessage, setSetingMessage }
    }
)